package com.ghr.common.enums;

/**
 * @author Gghr
 * @version 1.0
 * @date 2023/7/18 21:29
 */
public enum ErrorCode {
    SUCCESS(0, "ok"),
    PARAMS_ERROR(40000, "请求参数错误"),
    NULL_ERROR(40001, "请求参数为空"),
    REQ_ERROR(40001, "请求数据错误"),
    RESP_ERROR(40002,"响应数据错误"),
    RESP_NULL_ERROR(40002,"响应数据为空"),
    NOT_LOGIN(40100, "未登录"),
    NO_AUTH(40100, "无权限"),
    FORBIDDEN(40300, "无权限"),
    SYSTEM_ERROR(50000, "系统内部异常"),


;
    private final int code;
    private final String message;

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

    ErrorCode(int code, String message){
        this.code = code;
        this.message = message;
    }
}
